home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / xmcd-1.4 / libdi.d / os_aux.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-10  |  2.5 KB  |  76 lines

  1. /*
  2.  *   libdi - CD Audio Player Device Interface Library
  3.  *
  4.  *   Copyright (C) 1995  Ti Kan
  5.  *   E-mail: ti@amb.org
  6.  *
  7.  *   This program is free software; you can redistribute it and/or modify
  8.  *   it under the terms of the GNU General Public License as published by
  9.  *   the Free Software Foundation; either version 2 of the License, or
  10.  *   (at your option) any later version.
  11.  *
  12.  *   This program is distributed in the hope that it will be useful,
  13.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *   GNU General Public License for more details.
  16.  *
  17.  *   You should have received a copy of the GNU General Public License
  18.  *   along with this program; if not, write to the Free Software
  19.  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  *   This software fragment contains code that interfaces the CD player
  22.  *   application to the Apple A/UX operating system.  The name "Apple"
  23.  *   is used here for identification purposes only.
  24.  */
  25.  
  26. #ifndef __OS_AUX_H__
  27. #define __OS_AUX_H__
  28.  
  29. #if defined(macII) && defined(DI_SCSIPT) && !defined(DEMO_ONLY)
  30.  
  31. #ifndef LINT
  32. static char *_os_aux_h_ident_ = "@(#)os_aux.h    5.4 94/12/28";
  33. #endif
  34.  
  35.  
  36. #include <sys/scsiccs.h>
  37. #include <sys/scsireq.h>
  38.  
  39.  
  40. #define    SCSISTART    _IOWR('S', 1, struct userscsireq)
  41.  
  42. typedef    unsigned char    uchar;
  43.     
  44. struct userscsireq {
  45.     uchar    *cmdbuf;    /* buffer containing CDB */
  46.     uchar    cmdlen;        /* length of CDB */
  47.     uchar    *databuf;    /* buffer containing data to send or receive */
  48.     ulong    datalen;    /* length of the data buffer (8 KB maximum) */
  49.     ulong    datasent;    /* length of data actually sent or received */
  50.     uchar    *sensebuf;    /* optional error result from sense command */
  51.     uchar    senselen;    /* optional sense buf length (100 byte max) */
  52.     uchar    sensesent;    /* length of sense data received */
  53.     ushort    flags;        /* read/write flags */
  54.     uchar    msg;        /* mode byte returned on command complete */
  55.     uchar    stat;        /* completion status byte */
  56.     uchar    ret;        /* return code from SCSI Manager */
  57.     short    timeout;    /* maximum seconds inactivity for request */
  58. };
  59.  
  60.  
  61. #define OS_MODULE    /* Indicate that this is compiled on a supported OS */
  62. #define SETUID_ROOT    /* Setuid root privilege is required */
  63.  
  64.  
  65. /* Public function prototypes */
  66. extern bool_t    pthru_send(byte_t, word32_t, byte_t *, word32_t, byte_t,
  67.             word32_t, byte_t, byte_t, byte_t, bool_t);
  68. extern bool_t    pthru_open(char *);
  69. extern void    pthru_close(void);
  70. extern char    *pthru_vers(void);
  71.  
  72. #endif    /* macII DI_SCSIPT DEMO_ONLY */
  73.  
  74. #endif    /* __OS_AUX_H__ */
  75.  
  76.